package com.mrjy.payment.bo;

import com.mrjy.common.bo.IPaymentBo;
import com.mrjy.common.entity.OrderInfo;
import com.mrjy.common.entity.UserBalanceInfo;
import com.mrjy.common.entity.UserBalancePayment;
import com.mrjy.common.entity.UserInfo;
import com.mrjy.payment.dto.UserBalancePaymentSchoolDTO;
import com.tencent.protocol.pay_protocol.ScanPayResData;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import java.util.List;
import java.util.Map;

public interface IUserBalancePaymentBo extends IPaymentBo{
	/**
	 * 开始订单
	 * @param userBalancePayment
	 * @param userInfo
	 * @return
	 */
	Object beginPayment(UserBalancePayment userBalancePayment,UserInfo userInfo);
	/**
	 * 提交订单
	 * @param userBalancePayment
	 * @param userInfo
	 * @return
	 */
	Object txSubmitPayment(UserBalancePayment userBalancePayment,UserInfo userInfo);
	/**
	 * 根据编号获取订单
	 * @param code
	 * @return
	 */
	Object getPaymentByCode(String code);
	/**
	 * 根据订单号查询是否付款
	 * @param code
	 * @return
	 */
	Object validatePay(String code);
	/**
	 * 
	 * @param params		支付宝GET过来参数
	 * @param out_trade_no		商户订单号
	 * @param trade_no		支付宝交易号
	 * @param trade_status		交易状态
	 * @param money		付款金额
	 * @return
	 */
	UserBalancePayment txReturnUrl(Map<String, String> params, String out_trade_no,
			String trade_no, String trade_status, Float money);
	
	public String notifyUrl(Map<String, String> params, String out_trade_no,
			String trade_no, String trade_status, Float money);
	
	public String WXnotifyUrl(ScanPayResData scanPayResData);

    public Object WXPollingNotify(ScanPayResData scanPayResData);


	//获取充值记录
	public Object queryUserBalancePayments(UserInfo userInfo);
	
	public Object updatePaymentFlag(UserInfo userInfo,UserBalancePayment userBalancePayment);
	
	//批量删除订单
	public Object deleteByIds(UserInfo userInfo,int[] ids);
	
	/**
	 * 余额支付
	 * @param userBalanceInfo
	 * @param userInfo
	 * @return
	 */
	public Object txBalancePay(UserBalanceInfo userBalanceInfo , UserInfo userInfo);
	
	/**
	 * 后台分页查看订单明细
	 * @param userBalancePayment
	 * @param userInfo
	 * @return 
	 */
	public Object getOrderListByPage(UserBalancePayment userBalancePayment,UserInfo userInfo);
	/**
	 * 获取订单状态列表
	 * @return
	 */
	public Object getOrderStatus();
	
	/**
	 * 导出订单列表
	 * @param userBalancePayment
	 * @param userInfo
	 * @return
	 */
	public Object exportPaymentList(HttpServletResponse response,UserBalancePayment userBalancePayment,UserInfo userInfo);
	
	/**
	 * 获取支付方式列表
	 * @return
	 */
	public List<UserBalancePayment> getPayMethodList();
	/**
	 * 检查订单是否含有未选年级
	 * @return
	 */
	public String checkPaymentNoGrade(UserInfo userInfo);
	
	Object getScanPayUrl(OrderInfo info);
	
	Object querySchoolStudentPaymentBySchoolId(UserBalancePaymentSchoolDTO dto ,UserInfo ui);

	Object exportExl(UserBalancePayment userBalancePayment,
			HttpServletResponse response, HttpSession session);

	Object exportSchoolUserPaymentBack(HttpServletResponse response,UserBalancePaymentSchoolDTO dto, UserInfo userInfo);
	Object txUpdateOrderNote(UserBalancePayment userBalancePayment);
	
	Object isDuringActivity(UserBalancePayment userBalancePayment, Map<String, Object> map);
	Object groupByMoney();
	Object querySpecialPayment(UserBalancePayment userBalancePayment,
			HttpSession session);
	Object exportSpecialPayment(UserBalancePayment userBalancePayment,
			HttpServletResponse response, HttpSession session);
	
}
